import time

from selenium import webdriver
from webdriver_manager.chrome import ChromeDriverManager

class BasePage(object):
    # 打开浏览器
    def __init__(self):
        self.driver = webdriver.Chrome(ChromeDriverManager().install())
        self.driver.set_window_size(1550,1000)
    # 输入网址
    def get(self,request_url):
        self.driver.get(url=request_url)

    # 点击操作
    def base_click(self,element):
        self.driver.find_element(*element).click()
        time.sleep(2)

    # 输入文本操作
    def base_send_keys(self,element,content):
        self.driver.find_element(*element).send_keys(content)

    # 拖动操作
    # 滚动操作

if __name__ == '__main__':
    bp = BasePage()
    bp.get(request_url="https://ssov2.t.dingdongxiaoqu.com/login?app_id=522")